import axios from '@/libs/api.request'
// 支付流水
export const paymentQuery = (data) => {
  return axios.request({
    // url: 'http://10.101.3.228:8088/crs/payment/list',
    url: '/sales/pay/payment/query',
    method: 'post',
    data: data
  })
}
// 逆向流水查询
export const refundQuery = (data) => {
  return axios.request({
    // url: 'http://10.101.3.228:8088/crs/payment/refund/list',
    url: '/sales/pay/refund/query',
    method: 'post',
    data: data
  })
}

//  外部对账查询
export const payBillList = (data) => {
  return axios.request({
    // url: '/api/pay/bill/list',
    // url: 'http://10.101.3.144:8080' + '/oms/merchant/payment/bill/external/result/page',
    url: '/oms/merchant/payment/bill/external/result/page',
    method: 'post',
    data: data
  })
}

//  外部对账差错处理 -- 带批量差错处理功能
export const payBillFix = (data) => {
  return axios.request({
    // url: '/api/pay/bill/fix',
    // url: 'http://10.101.3.144:8080' + '/oms/merchant/payment/bill/external/fix',
    url: '/oms/merchant/payment/bill/external/fix',
    method: 'post',
    data: data
  })
}

// 查询手工对账的任务状态
export const getDiyStatus = (data) => {
  return axios.request({
    // url: '/api/pay/bill/fix',
    // url: 'http://10.101.3.144:8080' + '/oms/merchant/payment/bill/external/check/status',
    url: '/oms/merchant/payment/bill/external/check/status',
    method: 'post',
    data: data
  })
}

// 手工对账
export const handleDiy = (data) => {
  return axios.request({
    // url: '/api/pay/bill/fix',
    // url: 'http://10.101.3.144:8080' + '/oms/merchant/payment/bill/external/check',
    url: '/oms/merchant/payment/bill/external/check',
    method: 'post',
    data: data
  })
}
